#include "Protocol_MAC.h"

CProtocol_MAC::CProtocol_MAC(void)
{
	name = "MAC";
}

CProtocol_MAC::~CProtocol_MAC(void)
{
}

StackUtils::e_Status CProtocol_MAC::Decode( CPacket& packet )
{
	packet.removeElements(0, name.size() + 2);
	packet.removeElements(packet.getBufferContent().size() - (name.size() + 2), name.size() + 2);
	return StackUtils::E_SUCCESS;
}

StackUtils::e_Status CProtocol_MAC::Encode( CPacket& packet )
{
	packet.addFront("[MAC]");
	packet.addBack("[MAC]");
	return StackUtils::E_SUCCESS;
}
